public class Day1012T7 {
    public static void main(String[] args) {
        int a[] = {1, 123, 34, 5, 65, 43, 333, 8, 9, 10};
        int max = a[0];
        for (int b = 0; b < a.length; b++) {
            if (max < a[b]) {
                max = a[b];
            }
        }
        System.out.println("最大数为" + max);
        int x = 0;
        for (x = 0; x < a.length - 1; x++) {
            if (a[x] == max) {
                break;
            }
        }
        System.out.println("最大数的位置为" + x);
    }
}
